<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			document.write("在以下字符中：")
			var arr = ["America", "Greece", "Britain", "Cannda", "China", "Egyp"];
			var count = 0;
			for (var i in arr) {
				document.write("<br/>" + arr[i]);
				if (arr[i].indexOf("a") != -1 || arr[i].indexOf("A") != -1) {
					count++;
				}
			}
			document.write("共有" + count + "个字符串中包含a或A");

			//var a={"aa","b","c"};
			//alert(a.length);
		</script>
	</head>
	<body>
	</body>
</html>
